//
//  HomeFunctionView.m
//  BigToBig
//
//  Created by liuyi on 7/14/16.
//  Copyright © 2016 cn.cloudtp. All rights reserved.
//

#import "HomeFunctionView.h"

@interface HomeFunctionView (){
    UIButton *sortBtn;
    UIButton *filterBtn;
}


@end

@implementation HomeFunctionView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView{
    self.backgroundColor = COLOR_RGBA(247, 247, 247, 1);

    //  排序按钮
    sortBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, (kScreenWidth / 2), 40)];
    [sortBtn setTitle:@"综合排序" forState:UIControlStateNormal];
    [sortBtn.titleLabel setFont:[UIFont systemFontOfSize:16]];
    sortBtn.backgroundColor = COLOR_RGBA(247, 247, 247, 1);
    [sortBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    [sortBtn setTitleColor:COLOR_RGBA(88, 165, 255, 1) forState:UIControlStateSelected];
    [self addSubview:sortBtn];
    
    UILabel *funcLabel = [[UILabel alloc]initWithFrame:CGRectMake(kScreenWidth / 2 - 0.5, 10, 0.5, 20)];
    funcLabel.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:funcLabel];
    
    //  筛选按钮
    filterBtn = [[UIButton alloc]initWithFrame:CGRectMake(kScreenWidth / 2, 0, kScreenWidth/2, 40)];
    [filterBtn setTitle:@"筛选" forState:UIControlStateNormal];
    [filterBtn.titleLabel setFont:[UIFont systemFontOfSize:16]];
    filterBtn.backgroundColor = COLOR_RGBA(247, 247, 247, 1);
    [filterBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    [filterBtn setTitleColor:COLOR_RGBA(88, 165, 255, 1) forState:UIControlStateSelected];
    [self addSubview:filterBtn];

}

@end
